﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {

        }
    }
    protected void btnLogin_Click(object sender, ImageClickEventArgs e)
    {
        if (checkLoginSuccess())
        {
            setCookiesSession();

            Server.Transfer("Main.aspx");
        }
        else
        {
            Server.Transfer("LoginFail.html");
        }
    }

    //登录检验
    private bool checkLoginSuccess()
    {
        bool ret = false;
        if (txtUser.Text.Trim() == "" || txtPwd.Text.Trim() == "")
        {
            ret = false;
        }
        else
        {
            ret = true;
        }
        return ret;
    }

    //处理Cookies和Session等
    private void setCookiesSession()
    {
 
    }
}
